﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="MvcMall.AdminWeb.Manage.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <link href="/Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#mainframe").load(function () {
                var mainheight = $(this).contents().find("body").height() + 30;
                if (mainheight > 800)
                    $(this).height(mainheight);
            });

            $('.menu_div a').click(function (ev) {
                $('.menu_div a.selected').removeClass('selected');
                $(this).addClass('selected');
            });

            $("#leftMenu").accordion();
        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="page">
        <div id="header">
            <div id="logo">
                <img src="../Styles/themes/base/images/title.jpg" />
            </div>
            <div id="logindisplay">
                <%  if (Request.IsAuthenticated)
                    { %>
                欢迎使用 <b>
                    <%= User.Identity.Name %></b>! [<a href="AdminUsers/ChangePassword.aspx" target="mainframe">修改密码</a>]
                [
                <asp:LinkButton ID="btnLogOff" runat="server" CausesValidation="true" Text="退出" OnClick="btnLogOff_Click"></asp:LinkButton>
                ]
                <%  } %>
            </div>
        </div>
        <div id="main">
            <table width="100%" cellpadding="0" style="border: none;" cellspacing="0" border="0">
                <tr>
                    <td style="width: 200px; border: none; background-color: #E8F3F9; border-right: solid 1px #e8eef4;
                        vertical-align: top">
                        <div id="leftMenu">
                            <asp:Repeater ID="rptModuls" runat="server" OnItemDataBound="rptModuls_ItemDataBound">
                                <ItemTemplate>
                                    <h3>
                                        <a href="#">
                                            <%# Eval("ModulName") %></a></h3>
                                    <asp:Label ID="lblModulId" Visible="false" runat="server" Text='<%# Eval("Id") %>'
                                        Enabled="false"></asp:Label>
                                    <asp:Repeater ID="rptMenus" runat="server">
                                        <HeaderTemplate>
                                            <div class="menu_div">
                                                <ul>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <li>
                                                <asp:HyperLink ID="lnkMenu" runat="server" NavigateUrl='<%# Eval("LinkUrl") %>' Text='<%# Eval("MenuName") %>'
                                                    Target="mainframe"></asp:HyperLink>
                                            </li>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </ul> </div></FooterTemplate>
                                    </asp:Repeater>
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                    </td>
                    <td style="border: none; vertical-align: top;">
                        <iframe id="mainframe" name="mainframe" frameborder="0" height="800px" src="/Manage/Welcome.aspx"
                            scrolling="no" width="100%"></iframe>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
